//
//  BKBaseRequest.h
//  智能备考学习
//
//  Created by 盛超 on 2018/1/18.
//  Copyright © 2018年 盛超. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface BKBaseRequest : NSObject

/*
 *超时时间
 */
@property (nonatomic,assign) CGFloat requestTimeoutInterval;

/*
 *请求url
 */
@property (nonatomic,strong) NSString *requestUrl;

/*
 *请求参数
 */
@property (nonatomic,strong) NSDictionary *requestParam;

- (void)requestGetMethodWithSuccess:(void(^)(id responseObject))success
                         Failure:(void(^)(NSError *error))failure;

- (void)requestPostMethodWithSuccess:(void(^)(id responseObject))success
                    Failure:(void(^)(NSError *error))failure;


/**
 FTP请求

 @param path 需要请求下载列表的服务器文件夹路径
 @param success 成功回调
 - unzipPath: 解压缩后的文件夹的绝对路径
 - subFilePaths: 解压缩后的文件夹里的文件路径，若无后缀，则还是一层文件夹，这里根据后缀来解析获得需要的数据
 @param failure 失败回调
 */
- (void)gr_addRequestForListDirectoryAtPath:(NSString *)path
                                    success:(void(^)(NSString *unzipPath, NSArray *subPaths))success
                                    failure:(void(^)(NSError *error))failure;
@end
